package com.iims.project.service;

import com.iims.project.domain.CmisWorkToken;
import com.iims.project.vo.query.GroupWorkTokenSearchQuery;
import com.iims.project.vo.request.WorkTokenEditRequest;
import com.iims.project.vo.resp.CmisWorkTokenDetailVo;
import com.iims.project.vo.resp.CmisWorkTokenRowVo;

import java.util.List;

/**
 * @author fanpei
 * @date 2021/7/8 11:01
 */
public interface IWorkTokenService {
    /**
     * 查询工作令列表
     *
     * @param workToken
     * @return
     */
    List<CmisWorkTokenRowVo> getWorkTokenList(CmisWorkToken workToken);

    /**
     * 查询工作令列表 分组查询
     *
     * @param groupSearchQuery
     * @return
     */
    List<CmisWorkTokenRowVo> getWorkTokenListByGroup(GroupWorkTokenSearchQuery groupSearchQuery);

    /**
     * 获取项目所属工作令列表
     *
     * @param proId
     * @return
     */
    List<CmisWorkTokenRowVo> getProWorkTokenList(Long proId);

    /**
     * 获取合同所属工作令列表
     *
     * @param contractId
     * @return
     */
    List<CmisWorkTokenRowVo> getContractWorkTokenList(Long contractId);


    /**
     * 查询指定工作令详情
     *
     * @return
     */
    CmisWorkTokenDetailVo getWorkTokenDetailById(Long proId);

    /**
     * 新增
     *
     * @param workToken
     */
    void insertWorkToken(WorkTokenEditRequest workToken);

    /**
     * 更新
     *
     * @param workToken
     */
    void updateWorkToken(WorkTokenEditRequest workToken);

    /**
     * 删除
     *
     * @param workTokenId
     */
    void deleteById(Long workTokenId);

    /**
     * 检查工作令使用情况
     *
     * @param workTokenId
     * @return
     */
    boolean checkCmisWorkTokenUse(Long workTokenId);
}
